#ifndef EDITORCORE_IENTITY_H
#define EDITORCORE_IENTITY_H

#include "Common/Common.h"
#include "Drawing/IDrawer.h"
#include "EditorCore/Property/Property.h"

namespace editor_core {

	class IEntity
	{
	public:
		virtual ~IEntity() {};

		virtual int GetId() const = 0;

		virtual void GetChildren( cmn::ICollection<IEntity*>& children ) const = 0;
		virtual void GetParents( cmn::ICollection<IEntity*>& parents ) const = 0;

		virtual void GetProperties( cmn::ICollection<Property>& properties ) const = 0;
		virtual bool TryUpdateProperty( Property& property ) const = 0;
		virtual bool TryUpdateFromProperty( const Property& property ) = 0;

		virtual void Tick() = 0;
		virtual void Draw( drawing::IDrawer* drawer ) = 0;

		virtual cmn::Vec2 Move( const cmn::Vec2& vector ) = 0;

		virtual bool IsSelected() const = 0;
		virtual void SetSelected( bool select ) = 0;

		virtual void Delete() = 0;
		virtual void Undelete() = 0;

		virtual bool Contains( const cmn::Vec2& point ) const = 0;
	};
}

#endif
